-
Notifications
You must be signed in to change notification settings - Fork 200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Results configuration in tekton config #2398
base: main
Are you sure you want to change the base?
Conversation
Skipping CI for Draft Pull Request. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you create documentation for this PR?
@pratap0007 include the doc changes[1] on this PR |
dbb72d6
to
42f99c8
Compare
The following is the coverage report on the affected files.
|
42f99c8
to
a1ce3b9
Compare
The following is the coverage report on the affected files.
|
1c5b5ff
to
13655eb
Compare
The following is the coverage report on the affected files.
|
13655eb
to
055a55b
Compare
The following is the coverage report on the affected files.
|
/test pull-tekton-operator-integration-tests |
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
/test pull-tekton-operator-integration-tests |
2 similar comments
/test pull-tekton-operator-integration-tests |
/test pull-tekton-operator-integration-tests |
d79866d
to
00bbc52
Compare
The following is the coverage report on the affected files.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am looking forward to this feature being merged into the main branch soon.
Coincidentally, we also have a similar need and hope to automatically deploy TektonResults
through TektonConfig
.
tr.Status.MarkDependencyMissing(fmt.Sprintf("Default db %s creation is failing", DbSecretName)) | ||
return err | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it is another exception, such as a network timeout, should an error be returned here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think writing it this way would be clearer?
if err != nil && apierrors.IsNotFound(err) {
_, err = r.kubeClientSet.CoreV1().Secrets(tr.Spec.TargetNamespace).Create(ctx, newDBSecret, metav1.CreateOptions{})
...
}
return err
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, would be clear if we have to check only a condition
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The current writing places a significant mental burden.
It is necessary to consider whether the final return nil is accurate.
Would this be better?
if err == nil {
return nil
}
if !apierrors.IsNotFound(err) {
// logger
return err
}
newDBSecret := r.getDBSecret(DbSecretName, tr.Spec.TargetNamespace, tr)
...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, it would be better
newDBSecret := r.getDBSecret(DbSecretName, tr.Spec.TargetNamespace, tr) | ||
_, err := r.kubeClientSet.CoreV1().Secrets(tr.Spec.TargetNamespace).Create(ctx, newDBSecret, metav1.CreateOptions{}) | ||
if err != nil { | ||
logger.Error(err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add some contextual information to the error here, so it's easier to identify where the error was triggered when viewing the logs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pratap0007 Please address the review comments, It looks fine.
00bbc52
to
0260ad4
Compare
The following is the coverage report on the affected files.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your modification might still need a pull request to add end-to-end tests. 😆
|
||
_, err := r.kubeClientSet.CoreV1().Secrets(tr.Spec.TargetNamespace).Create(ctx, secret, metav1.CreateOptions{}) | ||
if err != nil { | ||
logger.Error(err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above.
tr.Status.MarkDependencyMissing(fmt.Sprintf("Default db %s creation is failing", DbSecretName)) | ||
return err | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The current writing places a significant mental burden.
It is necessary to consider whether the final return nil is accurate.
Would this be better?
if err == nil {
return nil
}
if !apierrors.IsNotFound(err) {
// logger
return err
}
newDBSecret := r.getDBSecret(DbSecretName, tr.Spec.TargetNamespace, tr)
...
0260ad4
to
70f1a26
Compare
The following is the coverage report on the affected files.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: l-qing The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
70f1a26
to
71f5652
Compare
The following is the coverage report on the affected files.
|
71f5652
to
7d696c2
Compare
The following is the coverage report on the affected files.
|
This will add the Results configuration to the tekton config and will be installed by default through tekton config Signed-off-by: Shiv Verma <[email protected]>
7d696c2
to
00091f3
Compare
The following is the coverage report on the affected files.
|
/test pull-tekton-operator-integration-tests |
/retest |
1 similar comment
/retest |
installed by default through tekton config
Changes
Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:
make test lint
before submitting a PRSee the contribution guide for more details.
Release Notes